<?php
namespace app\index\controller;
use app\index\model\Companyprofile;
class Company extends Comm
{
    //公司简介显示
    public function index(){
        $companyprofile=new Companyprofile();
        $res=$companyprofile->index();
        return view('index',['res'=>$res]);
    }
    public function add(){
        $companyprofile=new Companyprofile();
        $res=$companyprofile->index();
        return view('add',['res'=>$res]);
    }
    public function updatedata(){
        $data=$_POST['res'];
        $companyprofile=new Companyprofile();
        $bool=$companyprofile->add($data);
        if($bool)
            echo 1;
        else
            echo 0;
    }
}